import Vue from 'vue'
import Vuex from 'vuex'

import {users} from "./users/users";

import persistedState from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({
  // state: {

  // },
  // getters: {
  // },
  // mutations: {
  // },
  // actions: {
  // },
  modules: {
   users
  },
  getters: {
    username(state) {
      return state.users.username
    },
    token(state) {
      return state.users.token
    }
  },
  plugins:[persistedState()]
})